﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Bank.Account;

namespace Bank.Reports
{

    public class YearReport : IReport
    {
        public void Visit(DepositAccount account)
        {
            startReport();
            reportAccount(account);
            endReport();

        }

        public void Visit(CurrentAccount account)
        {
            startReport();
            reportAccount(account);
            endReport();

        }

        public void Visit(ForeignCurrencyAccount account)
        {
            startReport();
            reportAccount(account);
            endReport();
        }

        public void Visit(SavingsAccount account)
        {
            startReport();
            reportAccount(account);
            endReport();
        }

        public void Visit(SecondaryAccount account)
        {
            startReport();
            reportAccount(account);
            endReport();

        }


        public void Visit2(DepositAccount account)
        {
            startReport();
            reportAccount(account);
            endReport();

        }

        public void Visit2(CurrentAccount account)
        {
            startReport();
            reportAccount2(account);
            endReport();

        }

        public void Visit2(ForeignCurrencyAccount account)
        {
            startReport();
            reportAccount2(account);
            endReport();
        }

        public void Visit2(SavingsAccount account)
        {
            startReport();
            reportAccount2(account);
            endReport();
        }

        public void Visit2(SecondaryAccount account)
        {
            startReport();
            reportAccount2(account);
            endReport();

        }



        public void reportAccount(IAccount account)
        {
            Console.WriteLine("Client ID = " + account.ClientId);
            Console.WriteLine("Account Number = " + account.Number);
            Console.WriteLine("Ballacne = " + account.Ballance);
        }

        public void reportAccount2(IAccount account)
        {
            Console.WriteLine("Client ID = " + account.ClientId);
            Console.WriteLine("Account Number = " + account.Number);
            Console.WriteLine("Ballacne = " + account.Ballance2);
        }


        public void startReport()
        {
            Console.WriteLine("----------------------------------");
            Console.WriteLine("--------------REPORT--------------");
            Console.WriteLine("----------------------------------");
        }

        public void endReport()
        {
            Console.WriteLine("----------------------------------");
            Console.WriteLine("----------------------------------");
            Console.WriteLine("----------------------------------");
        }


    }
}
